Optimal. Leaf size=119 \[ \frac {(a+b x) (b f-a g) \left (a^2+2 a b x+b^2 x^2\right )^p (d+e x)^{-2 p-1}}{(2 p+1) (b d-a e)^2}-\frac {\left (a^2+2 a b x+b^2 x^2\right )^{p+1} (e f-d g) (d+e x)^{-2 (p+1)}}{2 (p+1) (b d-a e)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.086, Rules used = {769, 646, 37} \[ \frac {(a+b x) (b f-a g) \left (a^2+2 a b x+b^2 x^2\right )^p (d+e x)^{-2 p-1}}{(2 p+1) (b d-a e)^2}-\frac {\left (a^2+2 a b x+b^2 x^2\right )^{p+1} (e f-d g) (d+e x)^{-2 (p+1)}}{2 (p+1) (b d-a e)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 646
Rule 769
Rubi steps
\begin {align*} \int (d+e x)^{-3-2 p} (f+g x) \left (a^2+2 a b x+b^2 x^2\right )^p \, dx &=-\frac {(e f-d g) (d+e x)^{-2 (1+p)} \left (a^2+2 a b x+b^2 x^2\right )^{1+p}}{2 (b d-a e)^2 (1+p)}+\frac {(b f-a g) \int (d+e x)^{-2-2 p} \left (a^2+2 a b x+b^2 x^2\right )^p \, dx}{b d-a e}\\ &=-\frac {(e f-d g) (d+e x)^{-2 (1+p)} \left (a^2+2 a b x+b^2 x^2\right )^{1+p}}{2 (b d-a e)^2 (1+p)}+\frac {\left ((b f-a g) \left (a b+b^2 x\right )^{-2 p} \left (a^2+2 a b x+b^2 x^2\right )^p\right ) \int \left (a b+b^2 x\right )^{2 p} (d+e x)^{-2-2 p} \, dx}{b d-a e}\\ &=\frac {(b f-a g) (a+b x) (d+e x)^{-1-2 p} \left (a^2+2 a b x+b^2 x^2\right )^p}{(b d-a e)^2 (1+2 p)}-\frac {(e f-d g) (d+e x)^{-2 (1+p)} \left (a^2+2 a b x+b^2 x^2\right )^{1+p}}{2 (b d-a e)^2 (1+p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 97, normalized size = 0.82 \[ \frac {(a+b x) \left ((a+b x)^2\right )^p (d+e x)^{-2 (p+1)} (b (2 d f (p+1)+d g (2 p+1) x+e f x)-a (d g+e (2 f p+f+2 g (p+1) x)))}{2 (p+1) (2 p+1) (b d-a e)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.79, size = 348, normalized size = 2.92 \[ -\frac {{\left (a^{2} d^{2} g - {\left (b^{2} e^{2} f + 2 \, {\left (b^{2} d e - a b e^{2}\right )} g p + {\left (b^{2} d e - 2 \, a b e^{2}\right )} g\right )} x^{3} - 2 \, {\left (a b d^{2} - a^{2} d e\right )} f p - {\left (3 \, b^{2} d e f + {\left (b^{2} d^{2} - 2 \, a b d e - 2 \, a^{2} e^{2}\right )} g + 2 \, {\left ({\left (b^{2} d e - a b e^{2}\right )} f + {\left (b^{2} d^{2} - a^{2} e^{2}\right )} g\right )} p\right )} x^{2} - {\left (2 \, a b d^{2} - a^{2} d e\right )} f + {\left (3 \, a^{2} d e g - {\left (2 \, b^{2} d^{2} + 2 \, a b d e - a^{2} e^{2}\right )} f - 2 \, {\left ({\left (b^{2} d^{2} - a^{2} e^{2}\right )} f + {\left (a b d^{2} - a^{2} d e\right )} g\right )} p\right )} x\right )} {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} {\left (e x + d\right )}^{-2 \, p - 3}}{2 \, {\left (b^{2} d^{2} - 2 \, a b d e + a^{2} e^{2} + 2 \, {\left (b^{2} d^{2} - 2 \, a b d e + a^{2} e^{2}\right )} p^{2} + 3 \, {\left (b^{2} d^{2} - 2 \, a b d e + a^{2} e^{2}\right )} p\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.34, size = 1352, normalized size = 11.36 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 174, normalized size = 1.46 \[ -\frac {\left (b x +a \right ) \left (2 a e g p x -2 b d g p x +2 a e f p +2 a e g x -2 b d f p -b d g x -b e f x +a d g +a e f -2 b d f \right ) \left (e x +d \right )^{-2 p -2} \left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p}}{2 \left (2 a^{2} e^{2} p^{2}-4 a b d e \,p^{2}+2 b^{2} d^{2} p^{2}+3 a^{2} e^{2} p -6 a b d e p +3 b^{2} d^{2} p +a^{2} e^{2}-2 a b d e +b^{2} d^{2}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (g x + f\right )} {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{p} {\left (e x + d\right )}^{-2 \, p - 3}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.43, size = 375, normalized size = 3.15 \[ -{\left (a^2+2\,a\,b\,x+b^2\,x^2\right )}^p\,\left (\frac {x^2\,\left (2\,a^2\,e^2\,g-b^2\,d^2\,g-3\,b^2\,d\,e\,f+2\,a^2\,e^2\,g\,p-2\,b^2\,d^2\,g\,p+2\,a\,b\,d\,e\,g+2\,a\,b\,e^2\,f\,p-2\,b^2\,d\,e\,f\,p\right )}{2\,{\left (a\,e-b\,d\right )}^2\,{\left (d+e\,x\right )}^{2\,p+3}\,\left (2\,p^2+3\,p+1\right )}+\frac {x\,\left (a^2\,e^2\,f-2\,b^2\,d^2\,f+3\,a^2\,d\,e\,g+2\,a^2\,e^2\,f\,p-2\,b^2\,d^2\,f\,p-2\,a\,b\,d\,e\,f-2\,a\,b\,d^2\,g\,p+2\,a^2\,d\,e\,g\,p\right )}{2\,{\left (a\,e-b\,d\right )}^2\,{\left (d+e\,x\right )}^{2\,p+3}\,\left (2\,p^2+3\,p+1\right )}+\frac {a\,d\,\left (a\,d\,g+a\,e\,f-2\,b\,d\,f+2\,a\,e\,f\,p-2\,b\,d\,f\,p\right )}{2\,{\left (a\,e-b\,d\right )}^2\,{\left (d+e\,x\right )}^{2\,p+3}\,\left (2\,p^2+3\,p+1\right )}-\frac {b\,e\,x^3\,\left (b\,d\,g-2\,a\,e\,g+b\,e\,f-2\,a\,e\,g\,p+2\,b\,d\,g\,p\right )}{2\,{\left (a\,e-b\,d\right )}^2\,{\left (d+e\,x\right )}^{2\,p+3}\,\left (2\,p^2+3\,p+1\right )}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: HeuristicGCDFailed} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________